import { useAppDispatch, useAppSelector } from "./store/hook";
import { setToken } from "./store/modules/user";


function App() {
  const token = useAppSelector(state => state.user.token);
  const dispath = useAppDispatch();

  return (
    <div className="app">
      <p>token: {token}</p>
      <button onClick={() => dispath(setToken(Math.random().toString(16).slice(2)))}>设置token</button>
    </div>
  );
}

export default App;
